package com.wh.beans.custom;

import java.lang.*;

/**
 * 获取自定义表单对象
 * 
 * @author Administrator
 * 
 */
public class LabelInst {
	public static ICustomLabel getLabel(String fieldType) {
		ICustomLabel label = null;
		if (fieldType == null) {
			return label;
		}
		fieldType = fieldType.toLowerCase();
		try {

			FieldType ft = Enum.valueOf(FieldType.class, fieldType);
			switch (ft) {
			case select:
				label = new Select();
				break;
			case selectdate:
				label = new SelectDate();
				break;
			case selectdatetime:
				label = new SelectDatetime();
				break;
			case label:
				label = new Label();
				break;
			case logindepart:
				label = new LoginDepart();
				break;
			case loginuser:
				label = new LoginUser();
				break;
			case number:
				label = new Number();
				break;
			case selectdepart:
				label = new SelectDepart();
				break;
			case selectdeparts:
				label = new SelectDeparts();
				break;
			case selectuser:
				label = new SelectUser();
				break;
			case selectusers:
				label = new SelectUsers();
				break;
			case text:
				label = new Text();
				break;
			case textarea:
				label = new Textarea();
				break;
			case amount:
				label=new Amount();
				break;
			default:
				break;
			}
		} catch (Exception e) {
			// TODO: handle exception
		}
		return label;

	}
}
